module seg(
input [4:0] cur_f,
input up,
input down,
input stop,
output reg [6:0] dis_cur,
output reg [6:0] direc,
output reg [6:0] disdoor
);

parameter ONE = 7'b1001111;
parameter TWO = 7'b0100100;
parameter THREE = 7'b0110000;
parameter FOUR = 7'b0011001;
parameter FIVE = 7'b0010010;
parameter UP = 7'b1111110;
parameter DOWN = 7'b1110111;
parameter OPEN = 7'b1001001;
parameter CLOSE = 7'b1111111;

always@(*)
	begin
		case (cur_f)
		5'b00001: dis_cur <= ONE;
		5'B00010: dis_cur <= TWO;
		5'B00100: dis_cur <= THREE;
		5'B01000: dis_cur <= FOUR;
		5'B10000: dis_cur <= FIVE;
		endcase
	end

always@(*)
	begin
	if (up == 1)
	direc <= UP;
	else if(down ==1)
	direc <= DOWN;
	else 
	direc <= 7'b1111111;
	end
	
always@(*)
	begin
	if (stop == 1)
	disdoor <= OPEN;
	else 
	disdoor <= CLOSE;
	end
	
endmodule

